<!--{eval $_TPL['titles'] = array('日志');}-->
<!--{eval $friendsname = array(1 => '仅好友可见',2 => '指定好友可见',3 => '仅自己可见',4 => '凭密码可见');}-->

<!--{template header}-->

<!--{if !empty($_SGLOBAL[inajax])}-->
	<div id="space_blog" class="feed">
		<h3 class="feed_header">
			<a href="cp.php?ac=blog" class="r_option" target="_blank">发表日志</a>
			日志(共 $count 篇)
		</h3>
		<!--{if $count}-->
		<ul class="line_list">
		<!--{loop $list $value}-->
			<li>
				<span class="gray r_option"><!--{date('m-d H:i',$value[dateline],1)}--></span>
				<h4><a href="space.php?uid=$space[uid]&do=blog&id=$value[blogid]" target="_blank" <!--{if $value[magiccolor]}--> class="magiccolor$value[magiccolor]"<!--{/if}-->>$value[subject]</a></h4>
				<div class="detail">
					$value[message]
				</div>
			</li>
		<!--{/loop}-->
		</ul>
		<!--{if $pricount}-->
		<div class="c_form">本页有 $pricount 篇日志因作者的隐私设置而隐藏</div>
		<!--{/if}-->
		<div class="page">$multi</div>
		<!--{else}-->
		<div class="c_form">还没有相关的日志。</div>
		<!--{/if}-->
	</div>
<!--{else}-->

<!--{if $space[self]}-->
<div class="searchbar floatright">
<form method="get" action="space.php">
	<input name="searchkey" value="" size="15" class="t_input" type="text">
	<input name="searchsubmit" value="搜索日志" class="submit" type="submit">
	<input type="hidden" name="searchmode" value="1" />
	<input type="hidden" name="do" value="blog" />
	<input type="hidden" name="view" value="all" />
	<input type="hidden" name="orderby" value="dateline" />
</form>
</div>
<h2 class="title"><img src="image/app/blog.gif" />日志</h2>
<div class="tabs_header">
	<ul class="tabs">
		<!--{if $space[friendnum]}--><li$actives[we]><a href="space.php?uid=$space[uid]&do=$do&view=we"><span>好友最新日志</span></a></li><!--{/if}-->
		<li$actives[all]><a href="space.php?uid=$space[uid]&do=$do&view=all"><span>大家的日志</span></a></li>
		<li$actives[me]><a href="space.php?uid=$space[uid]&do=$do&view=me"><span>我的日志</span></a></li>
		<li$actives[click]><a href="space.php?uid=$space[uid]&do=$do&view=click"><span>我表态过的日志</span></a></li>
		<li class="null"><a href="cp.php?ac=blog">发表新日志</a></li>
	</ul>
</div>		
<!--{else}-->
<!--{eval 
	$_TPL['spacetitle'] = "日志";
	$_TPL['spacemenus'][] = "<a href=\"space.php?uid=$space[uid]&do=$do&view=me\">TA的所有日志</a>";
}-->
<!--{template space_menu}-->
<div class="h_status">按照发布时间排序</div>
<!--{/if}-->
		
<div id="content" style="width:640px;">
	<!--{if $_GET['orderby'] && $_GET['orderby'] != 'dateline'}-->
	<div class="h_status">
		排行时间范围：
		<a href="space.php?do=blog&view=all&orderby=$_GET[orderby]"{$day_actives[0]}>全部</a><span class="pipe">|</span>
		<a href="space.php?do=blog&view=all&orderby=$_GET[orderby]&day=1"{$day_actives[1]}>最近一天</a><span class="pipe">|</span>
		<a href="space.php?do=blog&view=all&orderby=$_GET[orderby]&day=2"{$day_actives[2]}>最近两天</a><span class="pipe">|</span>
		<a href="space.php?do=blog&view=all&orderby=$_GET[orderby]&day=7"{$day_actives[7]}>最近七天</a><span class="pipe">|</span>
		<a href="space.php?do=blog&view=all&orderby=$_GET[orderby]&day=30"{$day_actives[30]}>最近三十天</a><span class="pipe">|</span>
		<a href="space.php?do=blog&view=all&orderby=$_GET[orderby]&day=90"{$day_actives[90]}>最近三个月</a><span class="pipe">|</span>
		<a href="space.php?do=blog&view=all&orderby=$_GET[orderby]&day=120"{$day_actives[120]}>最近六个月</a>
	</div>
	<!--{/if}-->
	
	<!--{if $searchkey}-->
	<div class="h_status">以下是搜索日志 <span style="color:red;font-weight:bold;">$searchkey</span> 结果列表</div>
	<!--{/if}-->
	
	<!--{if $count}-->
	<div class="entry_list">
		<ul>
		<!--{loop $list $value}-->
			<li>
				<div class="avatardiv">
					<div class="avatar48"><a href="space.php?uid=$value[uid]"><!--{avatar($value[uid],small)}--></a></div>
					<!--{if $value['hot']}--><div class="digb">$value[hot]</div><!--{/if}-->
				</div>
				
				<div class="title">
					<a href="cp.php?ac=share&type=blog&id=$value[blogid]" id="a_share_$value[blogid]" onclick="ajaxmenu(event, this.id, 1)" class="a_share">分享</a>
					<h4><a href="space.php?uid=$value[uid]&do=$do&id=$value[blogid]" <!--{if $value[magiccolor]}--> class="magiccolor$value[magiccolor]"<!--{/if}-->>$value[subject]</a></h4>
					<div>
					<!--{if $value['friend']}-->
					<span class="r_option locked gray"><a href="$theurl&friend=$value[friend]" class="gray">{$friendsname[$value[friend]]}</a></span>
					<!--{/if}-->
					<a href="space.php?uid=$value[uid]">{$_SN[$value[uid]]}</a> <span class="gray"><!--{date('Y-m-d H:i',$value[dateline],1)}--></span>
					</div>
				</div>
				<div class="detail image_right l_text s_clear" id="blog_article_$value[blogid]">
					<!--{if $value[pic]}--><p class="image"><a href="space.php?uid=$value[uid]&do=blog&id=$value[blogid]"><img src="$value[pic]" alt="$value[subject]" /></a></p><!--{/if}-->
					$value[message]
				</div>
				<div class="gray">
					<!--{if $classarr[$value[classid]]}-->分类: <a href="space.php?uid=$value[uid]&do=blog&classid=$value[classid]">{$classarr[$value[classid]]}</a><span class="pipe">|</span><!--{/if}-->
					<!--{if $value[viewnum]}--><a href="space.php?uid=$value[uid]&do=$do&id=$value[blogid]">$value[viewnum] 次阅读</a><span class="pipe">|</span><!--{/if}-->
					<!--{if $value[replynum]}--><a href="space.php?uid=$value[uid]&do=$do&id=$value[blogid]#comment">$value[replynum] 个评论</a><!--{else}-->没有评论<!--{/if}-->
				</div>
			</li>
		<!--{/loop}-->
		<!--{if $pricount}-->
			<li>
				<div class="title">本页有 $pricount 篇日志因作者的隐私设置而隐藏</div>
			</li>
		<!--{/if}-->
		</ul>
	</div>
	
	<div class="page">$multi</div>
	
	<!--{else}-->
	<div class="c_form">还没有相关的日志。</div>
	<!--{/if}-->

</div>

<div id="sidebar" style="width:150px;">

<!--{if $userlist}-->
	<div class="cat">
	<h3>按好友查看</h3>
	<ul class="post_list line_list">
		<li>
			选择好友:<br>
			<select name="fuidsel" onchange="fuidgoto(this.value);">
			<option value="">全部好友</option>
			<!--{loop $userlist $value}-->
			<option value="$value[fuid]"{$fuid_actives[$value[fuid]]}>{$_SN[$value[fuid]]}</option>
			<!--{/loop}-->
			</select>
		</li>
	</ul>
	</div>
<!--{/if}-->
	
<!--{if $classarr}-->
	<div class="cat">
	<h3>日志分类</h3>
	<ul class="post_list line_list">
		<li<!--{if !$_GET[classid]}--> class="current"<!--{/if}-->><a href="space.php?uid=$space[uid]&do=blog&view=me">全部日志</a></li>
		<!--{loop $classarr $classid $classname}-->
		<li<!--{if $_GET[classid]==$classid}--> class="current"<!--{/if}-->>
			<!--{if $space[self]}-->
				<a href="cp.php?ac=class&op=edit&classid=$classid" id="c_edit_$classid" onclick="ajaxmenu(event, this.id)" class="c_edit">编辑</a>
				<a href="cp.php?ac=class&op=delete&classid=$classid" id="c_delete_$classid" onclick="ajaxmenu(event, this.id)" class="c_delete">删除</a>
			<!--{/if}-->
			<a href="space.php?uid=$space[uid]&do=blog&classid=$classid&view=me">$classname</a>
		</li>
		<!--{/loop}-->
	</ul>
	</div>
<!--{/if}-->

<!--{if $_GET['view'] == 'click'}-->
	<div class="cat">
	<h3>表态动作</h3>
	<ul class="post_list line_list">
		<li$click_actives[all]><a href="space.php?do=blog&view=click">全部动作</a></li>
		<!--{loop $clicks $value}-->
		<li{$click_actives[$value[clickid]]}>
			<a href="space.php?do=blog&view=click&clickid=$value[clickid]">$value[name]</a>
		</li>
		<!--{/loop}-->
	</ul>
	</div>
<!--{elseif $_GET['view'] == 'all'}-->
	<div class="cat">
	<h3>排行榜</h3>
	<ul class="post_list line_list">
		<li$all_actives[all]><a href="space.php?do=blog&view=all">推荐阅读</a></li>
		<li$all_actives[dateline]><a href="space.php?do=blog&view=all&orderby=dateline">最新发表</a></li>
		<li$all_actives[hot]><a href="space.php?do=blog&view=all&orderby=hot&day=$_GET[hotday]">人气排行</a></li>
		<li$all_actives[replynum]><a href="space.php?do=blog&view=all&orderby=replynum&day=$_GET[hotday]">评论排行</a></li>
		<li$all_actives[viewnum]><a href="space.php?do=blog&view=all&orderby=viewnum&day=$_GET[hotday]">查看排行</a></li>
		<!--{loop $clicks $value}-->
		<li{$all_actives['click_'.$value[clickid]]}><a href="space.php?do=blog&view=all&orderby=click_$value[clickid]&day=$_GET[hotday]">{$value[name]}排行</a></li>
		<!--{/loop}-->
	</ul>
	
	</div>
<!--{/if}-->

</div>

<script>
function fuidgoto(fuid) {
	window.location.href = "space.php?do=blog&view=we&fuid="+fuid;
}
</script>
<!--{/if}-->
	
<!--{template footer}-->